package com.yanqu.road.server.cmd.activity.douluodalu;

import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.douluodalu.DouLuoDaLuModule;
import com.yanqu.road.server.manger.activity.douluodalu.DouLuoDaLuMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;


@Cmd(code = Protocol.S_DOU_LUO_DA_LU_GET_EVENT_BATTLE_NOTIFY,desc = "获取我的森林被打日志")
public class DouLuoDaLuEventDefendDataCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        if ((ret = DouLuoDaLuMgr.canEntryActivity(player)) != 0) return;


        player.sendPacket(Protocol.U_DOU_LUO_DA_LU_GET_EVENT_BATTLE_NOTIFY,
                player.getModule(DouLuoDaLuModule.class).listDefendDataList());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
